#pragma once

#include "Image.h"
#include "State.h"
#include "SDL.h"
#include "Clip.h"
#include "Collider.h"
#include <vector>


//class Clip;
class Collider;
class State;
class Clip;
class Engine;
class Entity
{
protected:
	SDL_Rect* posRect;
	State* unstate;
	int currentFrame;
	Clip* bodyClip;
	Clip* weaponClip;
	Engine* eng;
	Collider* myCollider;

	int velocityX;
	int velocityY;
	int baseMoveSpeedX;
	int currentMoveSpeedX;
	int baseMoveSpeedY;
	int currentMoveSpeedY;
	int weight;
	//Image image;

public:
    Entity();
	Entity(int positionX,int positionY,int height,int width, Engine* e);
	~Entity(void);
	virtual void draw(SDL_Surface* screen,SDL_Rect * camera);
    virtual void update(){};
	void kill();
	void spawnAt();
	virtual void dragged(int x, int y);


	void setState(State* state);
	Clip* getBodyClip(){return bodyClip;}
	void setBodyClip(Clip* c){bodyClip = c;}
	State* getState(){return unstate;}
	int getVelocityX(){return velocityX;}
	int getVelocityY() {return velocityY;}
	void setVelocityX(int v){velocityX=v;}
	void setVelocityY(int v){velocityY=v;}
	void setCurrentMoveSpeedX(int c){currentMoveSpeedX=c;}
	void setCurrentMoveSpeedY(int c){currentMoveSpeedY=c;}
	int getWeight(){return weight;}
	void setWeight(int i) {weight = i;}
	Clip* getWeaponClip(){return weaponClip;}



	SDL_Rect* getPosRect(){return posRect;}
	void setRect(SDL_Rect* rect){posRect=rect;}

	//Collider
	Collider* getCollider(){return myCollider;}

};

